// 出库方面接口
import request from '@/utils/request'

// 出库单创建
export function createOutBoundOrder(data) {
  return request({
    url: '/api/outBound/createOutBoundOrder',
    method: 'post',
    data
  })
}

//  出库工单管理页面分页条件查询
export function getOutboundOrder() {
  return request({
    url: '/api/outBound',
    method: 'get'
  })
}

// 手动出库获取储位
export function getManualOutBound() {
  return request({
    url: '/api/outBound/manualOutBound',
    method: 'get'
  })
}

//  查询工单详情
export function getOutboundOrderDetail(id) {
  return request({
    url: `/api/outBound/getOutBoundDetail/${id}`,
    method: 'get'
  })
}

// 删除出库单
export function deleteOrder(id) {
  return request({
    url: `/api/outBound/deleteOrder/${id}`,
    method: 'get'
  })
}

//  执行出库单
export function startOrder(id, flowTo) {
  return request({
    url: `/api/outBound/startOrder/${id}/${flowTo}`,
    method: 'get'
  })
}

// 创建出库单-工程号模糊查询
export function getAllWorkNum() {
  return request({
    url: 'api/outBound/getAllWorkNum',
    method: 'get'
  })
}

// 创建出库单-批次号模糊查询
export function getAllProcesscardCode() {
  return request({
    url: 'api/outBound/getAllProcesscardCode',
    method: 'get'
  })
}

// 获取压机
export function getAllMachine() {
  return request({
    url: 'api/outBound/findAllMachine',
    method: 'get'
  })
}
